<?php

namespace App\Repositories;

use Prettus\Repository\Eloquent\BaseRepository;
use Prettus\Repository\Criteria\RequestCriteria;
use App\Repositories\PatientRepository;
use App\Entities\Patient;
use App\Validators\PatientValidator;

/**
 * Class PatientRepositoryEloquent
 * @package namespace App\Repositories;
 */
class PatientRepositoryEloquent extends BaseRepository implements PatientRepository
{
    /**
     * Specify Model class name
     *
     * @return string
     */
    public function model()
    {
        return Patient::class;
    }

    protected $fieldSearchable = [
        'age' => 'between',
        'name' => 'like',
        'sex',
        'phone' => 'like',
        'wechat' => 'like',
        'deportment_id',
        'patient_type_id',
        'updated_at' => 'between',
        'push_date' => 'between',
        'come_state',
        'come_date' => 'between',
    ];
    /**
     * Boot up the repository, pushing criteria
     */
    public function boot()
    {
        //$this->pushCriteria(app(RequestCriteria::class));
    }
}
